package uk.ac.aber.Blockmation;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

/**
 * ViewerTest Class - for testing the Viewer JFrame class
 * 
 * @author alex
 */

public class ViewerTest {
    
	
    public static void main(String[] args) throws IOException {
        
        // Create instance of MovieModel
        MovieModel movieModel = new MovieModel();
        
        // add image frames
        BufferedImage bim;
        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/1.bmp"));
        movieModel.appendFrame(bim);
        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/2.bmp"));
        movieModel.appendFrame(bim);
        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/3.bmp"));
        movieModel.appendFrame(bim);
        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/4.bmp"));
        movieModel.appendFrame(bim);
        
        
        // Create instance of Viewer and pass through MovieModel
        Viewer viewerDisplay = new Viewer(movieModel);
        
        ViewerStandAlone viewerDisplay2 = new ViewerStandAlone(movieModel);
        
        viewerDisplay.pack();
        viewerDisplay.setLocationRelativeTo(null);
        viewerDisplay.setVisible(true);

        viewerDisplay2.pack();
        viewerDisplay2.setLocationRelativeTo(null);
        viewerDisplay2.setVisible(true);
    }
    
}
